package org.evolver.disser;

import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JLabel;
import java.awt.Font;

import net.miginfocom.swing.MigLayout;

public class OutputPanel extends JPanel {
    private JTextArea   textArea;

    /* Default constructor */
    OutputPanel() {
        MigLayout outputLayout = new MigLayout("", "[left]");
        setLayout(outputLayout);

        add(new JLabel("Результаты расчетов"), "left, gaptop 10, wrap");
        Font font = new Font("Courier", Font.PLAIN, 11);
        textArea = new JTextArea("Проверка", 18, 60);
        textArea.setFont(font);
        JScrollPane scrollingArea = new JScrollPane(textArea);
        add(scrollingArea);
    }

    public JTextArea getTextArea() {
        return textArea;
    }

    public void showText(String newText) {
        textArea.setText(newText);
    }
}
